home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Chat & Communication / Digsby build 37 / digsby_setup.exe / lib / gui / video / webvideo.pyo (.txt) < prev   
Python Compiled Bytecode  |  2008-10-13  |  2KB  |  41 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. from __future__ import with_statement
  5. import wx
  6. from gui import skin
  7. from gui.browser import Browser
  8. from gui.toolbox import persist_window_pos
  9. import stdpaths
  10. from time import time
  11. from logging import getLogger
  12. log = getLogger('webvideo')
  13. EMBED_WRAPPER = '<html><head><style type="text/css">\nbody {\n    width: 99.9999%;\n    margin: 0%;\n    padding: 0%;\n    overflow: auto;\n}\n</style></head><body><<CONTENT>></body></html>\n'
  14. video_frame_style = wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN | wx.STAY_ON_TOP
  15. video_frame_size = (544, 264)
  16.  
  17. class VideoChatWindow(wx.Frame):
  18.     
  19.     def __init__(self, title, embed_tag, on_close = None):
  20.         wx.Frame.__init__(self, None, title = title, name = 'Web Video Chat Window', style = video_frame_style)
  21.         self.on_close = on_close
  22.         self.SetFrameIcon(skin.get('AppDefaults.TaskBarIcon'))
  23.         persist_window_pos(self)
  24.         self.SetClientSize(video_frame_size)
  25.         content = EMBED_WRAPPER.replace('<<CONTENT>>', embed_tag)
  26.         log.debug('opening video window with embed tag:')
  27.         log.debug(content)
  28.         self.browser = Browser(self, initialContents = content)
  29.         if on_close is not None:
  30.             self.Bind(wx.EVT_CLOSE, self.OnClose)
  31.         
  32.  
  33.     
  34.     def OnClose(self, e):
  35.         e.Skip()
  36.         if self.on_close is not None:
  37.             self.on_close()
  38.         
  39.  
  40.  
  41.